-
Notifications
You must be signed in to change notification settings - Fork 0
feat(bridge): add token lists for lifi #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
799658e to
125ef54
Compare
| "css:build:all": "yarn css:build && yarn workspace arb-token-bridge-ui css:build && yarn workspace portal css:build", | ||
| "css:watch:all": "yarn css:watch && yarn workspace arb-token-bridge-ui css:watch && yarn workspace portal css:watch" | ||
| "css:watch:all": "yarn css:watch && yarn workspace arb-token-bridge-ui css:watch && yarn workspace portal css:watch", | ||
| "test": "vitest --config vitest.config.ts --watch", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In later PR, we will need to run those tests in CI
125ef54 to
7ee57da
Compare
5f1711e to
e582e46
Compare
e582e46 to
ec34762
Compare
ec34762 to
0c01300
Compare
|
|
||
| const BASE_TOKEN_LIST = { | ||
| name: TOKEN_LIST_NAME, | ||
| timestamp: STATIC_TIMESTAMP, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this fixed timestamp intentional so that we update it only when we have a token list version bump?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add native USDC on Ethereum, native USDC on Arb One, and wrapped USDC.e on Arb One as test cases?
| }, | ||
| }, | ||
| ); | ||
| } catch (error: any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unknown would be a better type here as it's explicitly asserted
| if (parentChainId === null || childChainId === null) { | ||
| return NextResponse.json( | ||
| { | ||
| ...BASE_TOKEN_LIST, | ||
| tokens: [], | ||
| }, | ||
| { | ||
| status: 400, | ||
| headers: { | ||
| 'Cache-Control': 'public, max-age=60, s-maxage=60', | ||
| }, | ||
| }, | ||
| ); | ||
| } | ||
|
|
||
| if (!allowedLifiSourceChainIds.includes(parentChainId)) { | ||
| return NextResponse.json( | ||
| { | ||
| ...BASE_TOKEN_LIST, | ||
| tokens: [], | ||
| }, | ||
| { | ||
| status: 400, | ||
| headers: { | ||
| 'Cache-Control': 'public, max-age=60, s-maxage=60', | ||
| }, | ||
| }, | ||
| ); | ||
| } | ||
|
|
||
| if (!allowedLifiDestinationChainIds.includes(childChainId)) { | ||
| return NextResponse.json( | ||
| { | ||
| ...BASE_TOKEN_LIST, | ||
| tokens: [], | ||
| }, | ||
| { | ||
| status: 400, | ||
| headers: { | ||
| 'Cache-Control': 'public, max-age=60, s-maxage=60', | ||
| }, | ||
| }, | ||
| ); | ||
| } | ||
|
|
||
| if (!lifiDestinationChainIds[parentChainId]?.includes(childChainId)) { | ||
| return NextResponse.json( | ||
| { | ||
| ...BASE_TOKEN_LIST, | ||
| tokens: [], | ||
| }, | ||
| { | ||
| status: 400, | ||
| headers: { | ||
| 'Cache-Control': 'public, max-age=60, s-maxage=60', | ||
| }, | ||
| }, | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these conditions going to have different responses with the tokens: [] eventually? otherwise would be better to combine the conditions into a bracket
This PR is part of a stack created with Aviator.
masterSummary
Steps to test